tools/libxc: linux: Don't use getpagesize() when unmapping the grants
authorJulien Grall <julien.grall@citrix.com>
Fri, 7 Aug 2015 18:53:55 +0000 (19:53 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 13 Aug 2015 09:25:11 +0000 (10:25 +0100)
commit31cf2ca7518188ec154d1d82c38970883183fa3b
tree4a168d187f57ff8e5612f9d52fb605306bea1495
parent18dd9f7fc27fbe3c802c4e8f7e8ac3150eb7d624
tools/libxc: linux: Don't use getpagesize() when unmapping the grants

The grants are based on the Xen granularity (i.e 4KB). While the function
to map grants for Linux (linux_gnttab_grant_map) is using the correct
size (XC_PAGE_SIZE), the unmap one (linux_gnttab_munmap) is using
getpagesize().

On domain using a page granularity different than Xen (this is the case
for AARCH64 guest using 64KB page), the unmap will be called with the
wrong size.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxc/xc_linux_osdep.c